package com.ojoin.trade.bpm.web.support;

import org.activiti.engine.impl.interceptor.Session;
import org.activiti.engine.impl.interceptor.SessionFactory;
import org.activiti.engine.impl.persistence.entity.UserIdentityManager;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * Activiti User Entity Service Factory
 */
public class BpmUserEntityServiceFactory implements SessionFactory {
	
	@Autowired
	private BpmUserEntityService bpmUserEntityService;

	public Class<?> getSessionType() {
		return UserIdentityManager.class;
	}

	public Session openSession() {
		return bpmUserEntityService;
	}

}
